package com.john.blog.controller.back;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.john.blog.controller.back.support.BackBlogControllerSupport;

/**
 * 前端页面跳转
 * 
 * @author JiangGengchao
 * @date 2018年2月9日
 */
@Controller
public class BackPageController extends BackBlogControllerSupport {

    private final static String BACK_LOCATION = "back/";

    @RequestMapping("/index")
    public String index() {
        return appendPackage("index");
    }

    @RequestMapping("/left")
    public String left() {
        return appendPackage("left");
    }

    // ==============================================
    @RequestMapping("/login")
    public String login() {
        return appendPackage("login");
    }

    @RequestMapping("/password")
    public String password() {
        return appendPackage("password");
    }

    @RequestMapping("/report")
    public String report() {
        return appendPackage("report");
    }

    // ======================================
    @RequestMapping("/blog-add")
    public String blogAdd() {
        return appendPackage("blog-add");
    }

    @RequestMapping("/blog-edit")
    public String blogEdit() {
        return appendPackage("blog-edit");
    }

    @RequestMapping("/blog")
    public String blog() {
        return appendPackage("blog");
    }

    @RequestMapping("/category-add")
    public String categoryAdd() {
        return appendPackage("category-add");
    }

    @RequestMapping("/category-edit")
    public String categoryEdit() {
        return appendPackage("category-edit");
    }

    @RequestMapping("/category")
    public String category() {
        return appendPackage("category");
    }

    @RequestMapping("/comment-check")
    public String commentCheck() {
        return appendPackage("comment-check");
    }

    @RequestMapping("/comment-reply")
    public String commentReply() {
        return appendPackage("comment-reply");
    }

    @RequestMapping("/comment")
    public String comment() {
        return appendPackage("comment");
    }

    @RequestMapping("/donate-add")
    public String donateAdd() {
        return appendPackage("donate-add");
    }

    @RequestMapping("/donate-edit")
    public String donateEdit() {
        return appendPackage("donate-edit");
    }

    @RequestMapping("/donate")
    public String donate() {
        return appendPackage("donate");
    }

    @RequestMapping("/navigate")
    public String navigate() {
        return appendPackage("navigate");
    }

    @RequestMapping("/notice-add")
    public String noticeAdd() {
        return appendPackage("notice-add");
    }

    @RequestMapping("/notice-edit")
    public String noticeEdit() {
        return appendPackage("notice-edit");
    }

    @RequestMapping("/notice")
    public String notice() {
        return appendPackage("notice");
    }

    @RequestMapping("/tag-add")
    public String tagAdd() {
        return appendPackage("tag-add");
    }

    @RequestMapping("/tag-edit")
    public String tagEdit() {
        return appendPackage("tag-edit");
    }

    @RequestMapping("/tag")
    public String tag() {
        return appendPackage("tag");
    }

    @RequestMapping("/type-add")
    public String typeAdd() {
        return appendPackage("type-add");
    }

    @RequestMapping("/type-edit")
    public String typeEdit() {
        return appendPackage("type-edit");
    }

    @RequestMapping("/type")
    public String type() {
        return appendPackage("type");
    }

    @RequestMapping("/youlian-add")
    public String youlianAdd() {
        return appendPackage("youlian-add");
    }

    @RequestMapping("/youlian-edit")
    public String youlianEdit() {
        return appendPackage("youlian-edit");
    }

    @RequestMapping("/youlian")
    public String youlian() {
        return appendPackage("youlian");
    }

    @RequestMapping("/users")
    public String users() {
        return appendPackage("users");
    }

    /**
     * 添加包路径
     * 
     * @param page
     * @return
     */
    private String appendPackage(String page) {
        return BACK_LOCATION + page;
    }

}
